export default { 
	getOrderInfo(params){
		return this.vm.$u.post("/recycle/Order/getOrderInfo", params,{useStoreApi: true,loading:true,contenttype:true})
	}, 
	saveOrder(params){
		return this.vm.$u.post("/recycle/Order/addOrder", params,{useStoreApi: true,loading:true,contenttype:true})
	}, 
	// 修改订单
	editOrder(params){
		return this.vm.$u.post("/recycle/Order/editOrder", params,{useStoreApi: true,loading:true,contenttype:true})
	},
	// 回收订单
	getOrderList(params){
	 	return this.vm.$u.post("/recycle/Order/getOrderList", params,{useStoreApi: true,loading:true,contenttype:true})
	}, 
	getOrderTabs(params){
		return this.vm.$u.post("/applet/order/getOrderTabs", params)
	},
	getShopOrder(params){
		return this.vm.$u.get("/ycshop/Order/getOrderList", params,{useStoreApi: true,loading:true})
	},
	cancelOrder(params){
		let _this = this
		return new Promise((ret,rej) => {
			uni.showModal({
				title: '提示',
				content: '取消后无法恢复，是否取消？',
				success: function (res) {
					if (!res.confirm) {
						return rej()
					}   
					_this.vm.$u.post("/recycle/Order/cancelOrder", params,{useStoreApi: true,loading:true,contenttype:true}).then(res => {
						return ret(res)
					}).catch(err => {
						return rej(err)
					}) 
				}
			}); 
		}) 
	}, 
	getStoreOrderList(params){
		return this.vm.$u.post("/storeorder/Order/getOrderList", params,{useStoreApi: true,loading:true,contenttype:true})
	},
}